package com.cheng.service;

import com.cheng.common.exception.CommonException;
import com.cheng.data.entity.RoleInfoEntity;
import com.cheng.data.vo.PermInfoVO;
import com.cheng.data.vo.RoleInfoVO;

import java.util.List;

/**
 * @author: ChengJW
 * @date: 2021/11/14 12:12
 * @version: 1.0
 * @description: 角色信息表操作
 */
public interface RoleInfoService {

    /**
    * @author: ChengJW
    * @params: [entity]
    * @return: java.util.List<com.cheng.data.entity.RoleInfoEntity>
    * @date: 2021/11/14
    * @description: 查询角色用户信息列表
    */
    List<RoleInfoEntity> queryRoleInfoList(RoleInfoEntity entity) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [roCode]
    * @return: java.lang.String
    * @date: 2021/11/14
    * @description: 根据角色所属机关代码查询角色名称
    */
    String queryRoleInfoNmByCode(String roCode) throws CommonException;

    /**
     * @author: ChengJW
     * @params: []
     * @return: java.util.List<com.cheng.data.vo.PermInfoVO>
     * @date: 2021/11/16
     * @description: 根据角色信息查询菜单权限信息
     */
    List<PermInfoVO> queryAllPermInfoByRoleInfo(RoleInfoVO roleInfoVO) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [entity]
    * @return: int
    * @date: 2021/11/17
    * @description: 新增角色信息
    */
    int insertRoleInfo(RoleInfoEntity entity) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [entity]
    * @return: int
    * @date: 2021/11/17
    * @description: 修改角色信息
    */
    int updateRoleInfo(RoleInfoEntity entity) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [entity]
    * @return: int
    * @date: 2021/11/17
    * @description: 删除角色信息
    */
    int deleteRoleInfo(RoleInfoEntity entity) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [roId]
    * @return: com.cheng.data.entity.RoleInfoEntity
    * @date: 2021/11/17
    * @description: 根据角色 ID 查询角色信息
    */
    RoleInfoEntity queryRoleInfoById(String roId) throws CommonException;
}
